import {FINANCE_PREFIX, SYSTEM_PREFIX} from "@/store/constant";

export const tableOption = {
  height: 'auto',
  calcHeight: 210,
  searchShow: true,
  searchMenuSpan: 6,
  tip: false,
  border: true,
  index: true,
  addBtn: false,
  viewBtn: true,
  selection: true,
  indexLabel: "序号",
  column: [
    {
      label: "账户",
      prop: "accountId",
      type: "select",
      dicUrl: FINANCE_PREFIX + "/finance/all-account",
      props: {
        label: 'accountName',
        value: 'id'
      },
      rules: [{
        required: true,
        message: "请输入账户ID",
        trigger: "blur"
      }]
    },
    {
      label: "订单类别",
      prop: "billCategory",
      type: "select",
      rules: [{
        required: true,
        message: "请输入订单类别",
        trigger: "blur"
      }]
    },
    {
      label: "订单内容",
      prop: "content",
      span: 24,
      rules: [{
        required: true,
        message: "请输入订单内容",
        trigger: "blur"
      }]
    },
    {
      label: "金额",
      prop: "amount",
      type: "number",
      minRows: 0,
      precision: 2,
      rules: [{
        required: true,
        message: "请输入金额",
        trigger: "blur"
      }]
    },
    {
      label: "创建人",
      prop: "createUser",
      display: false,
      dicUrl: SYSTEM_PREFIX + '/user/all-user',
      props: {
        label: 'realName',
        value: 'id'
      },
      rules: [{
        required: true,
        message: "请输入创建人",
        trigger: "blur"
      }]
    },
    {
      label: "创建时间",
      prop: "createTime",
      display: false,
      rules: [{
        required: true,
        message: "请输入创建时间",
        trigger: "blur"
      }]
    // },
    // {
    //   label: "状态",
    //   prop: "status",
    //   rules: [{
    //     required: true,
    //     message: "请输入状态",
    //     trigger: "blur"
    //   }]
    }
  ]
}
